import {
  axios
} from '@/utils/request'

function getUserRegister () {
  return axios({
    url: '/workflow-manage/definition/element/user_register',
    method: 'get'
  })
}
function getAuditRoles (params) {
  return axios({
    url: '/user-service/role/list',
    method: 'get',
    params
  })
}
// 提交注册接口
function register (data) {
  return axios({
    url: '/user-service/register',
    method: 'post',
    data
  })
}
// 二次编辑用户注册信息
function editRegister (data) {
  return axios({
    url: '/user-service/register/edit',
    method: 'put',
    data
  })
}
// 查询用户信息详细接口
function getRegisterDetail(params){
  return axios({
    url: '/user-service/register/detail',
    method: 'get',
    params
  })
}
// 校验组织及角色
function validateOrgAndRole (data) {
  return axios({
    url: '/user-service/register/validateOrgAndRole',
    method: 'post',
    data
  })
}

export default {
  getUserRegister,
  getAuditRoles,
  register,
  editRegister,
  getRegisterDetail,
  validateOrgAndRole
}
